package main

import "fmt"

func fact(n int) int {
	if n == 0 {
		return 1
	}
	return n * fact(n-1)
}

//递归实现因子示例
func main() {
	fmt.Println(1*2*3*4*5 == fact(5))
}
